
	class Complex {

	private double real;
	private double imaginary;
	
	public Complex(double r, double im){
		
		this.real = r;
		this.imaginary = im;
	}
	
	public double getReal(){
		return this.real;
	}
	
	public double getImaginary(){
		return this.imaginary;
	}
	
	public Complex add(Complex other){
		return new Complex ((this.getReal()+other.getReal()),(this.getImaginary()+other.getImaginary()));
	}
	
	public Complex sub(Complex other){
		return new Complex ((this.getReal()-other.getReal()),this.getImaginary()-other.getImaginary());
	}
	
	public Complex mulu(Complex other){
		if ((other.getReal()*other.getReal() + other.getImaginary()*other.getImaginary())!=0){
		return new Complex ((this.getReal()*other.getReal() - this.getImaginary()*other.getImaginary())
				/ (other.getReal()*other.getReal() + other.getImaginary()*other.getImaginary()),
				(other.getReal()*this.getImaginary() - this.getReal()* other.getImaginary())
				/(other.getReal()*other.getReal() + other.getImaginary()*other.getImaginary()));
		}
		else{
			return null;
		}
	}
	
	
}
